<?php
class AdminAction{
	public $data;
	public $lang;
	
	function __construct(){
		$this->data = array();
		$editlang = getSession('editlang');
		if(!empty($editlang)){
			$this->lang = $editlang;
		}else{
			$this->lang = 'cn';
		}
	}
	
	function getDB(){
		require 'config/db.php';
		require 'inc/mysql.php';
		return $db = new mysql($dbhost, $dbuser, $dbpw, $dbname, $pconnect,$charset);
	}
	
	function loadLib($lib){
		require 'inc/lib/'.$lib.'.php';
		$lib = ucfirst($lib);
		return $lb = new $lib();
	}
}